package com.evildog.workspace.life.application.convert;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.evildog.workspace.common.result.PagedResult;
import com.evildog.workspace.life.application.bo.AlbumCategoryBO;
import com.evildog.workspace.life.application.bo.AlbumCategoryListBO;
import com.evildog.workspace.life.application.bo.AlbumCategoryPageBO;
import com.evildog.workspace.life.application.dto.AlbumCategoryDTO;
import com.evildog.workspace.life.application.dto.AlbumCategoryListDTO;
import com.evildog.workspace.life.application.dto.AlbumCategoryPageDTO;
import com.evildog.workspace.life.application.entity.AlbumCategory;
import com.evildog.workspace.life.application.entity.AlbumCategoryListDO;
import com.evildog.workspace.life.application.entity.AlbumCategoryPageDO;
import com.evildog.workspace.life.application.model.AlbumCategoryListParam;
import com.evildog.workspace.life.application.model.AlbumCategoryPageParam;
import com.evildog.workspace.life.application.model.AlbumCategoryParam;
import com.evildog.workspace.life.application.vo.AlbumCategoryListVO;
import com.evildog.workspace.life.application.vo.AlbumCategoryPageVO;
import com.evildog.workspace.life.application.vo.AlbumCategoryVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface AlbumCategoryConvert {

    AlbumCategoryConvert INSTANCE = Mappers.getMapper(AlbumCategoryConvert.class);

    AlbumCategoryPageDTO convert(AlbumCategoryPageParam albumCategoryPageParam);

    AlbumCategoryListDTO convert(AlbumCategoryListParam albumCategoryListParam);

    AlbumCategoryDTO convert(AlbumCategoryParam albumCategoryParam);

    @Mapping(target = "isDeleted", ignore = true)
    AlbumCategory convert(AlbumCategoryDTO albumCategoryDTO);

    AlbumCategoryPageDO convert(AlbumCategoryPageDTO albumCategoryPageDTO);

    AlbumCategoryVO convert(AlbumCategoryBO albumCategoryBO);

    AlbumCategoryBO convert(AlbumCategory albumCategory);

    List<AlbumCategoryListBO> convert(List<AlbumCategoryListDO> albumCategoryList);

    List<AlbumCategoryListVO> convertVoList(List<AlbumCategoryListBO> albumCategoryListBO);

    @Mappings({})
    PagedResult<AlbumCategoryPageBO> convert(IPage<AlbumCategoryPageDO> page);

    PagedResult<AlbumCategoryPageVO> convert(PagedResult<AlbumCategoryPageBO> page);
}